Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Notes and Domino Application Development wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

Community articleObject Oriented Programming With LotusScript
Added by ~Dexter Eljipy | Edited by ~Dexter Eljipy on March 15, 2010 | Version 13
expanded Abstract
collapsed Abstract
Describes how Opbject oriented Programming can be applied to LotusScript
Tags: OOP, Classes, LotusScript, Programming
Object Oriented Programming is the dominant style in modern program as used by popular languages such as Java and C#.  Despite this, OOP is not widely used within LotusScript even though the language support many of the capabilities needed to implement OOP.  The following is an introduction to the key components of LotusScript used to develop using OOP.
 
Classes
  • One of the key principals of Object Oriented Programming is the use of classes to encapuslate data objects.
  • Once defined, a class should facilitate all access to the object via properties and the manipulation of that object via methods.

Class Names

  • Class names must be unique across all LotusScript code that is references within a single module.  This includes all "Use " statements and and "Use" statements contained in those LotusScripty libararies.
  • Class names are not case sensitive.  e.g. having defined a class Employee it is not possible to craete a second class callled employee and it is possible to refer to the class using EMPLOYEE.

Constructor

  • Each class can have a constructor denoted by Sub New
  • When a class extends another class the constructors for each class are invoked starting with the based class and moving outwards.
  • Unlike some programming languages, the constructor cannot be overloaded with differing number of parameters or different Types for each paremater.  One way around this limitation is to provide a single parameter to the constructor of type Variant and then add logic to the constructor that tests the Type of the parameter.

Class Destructor

  • Each class can have a destructor denoted by Sub Delete
  • When a class extends another class the destructors for each class are invoked starting with the top class moving backwards. This is the opposite order to Constructors.

Class Extension

  • It is possible to extend a base class using syntax Class Newclass As Baseclass
  • All Properties and Methods (including constructor and destructor) are carried forward from the base class.
  • The new class can replace (override) a property or method defined in its base class. The new property/method must have the exact same signature for parameters as the underlying property/method.
  • When a property/method is overriden, the property/method in the base class is not invoked (Exception: Constructor and Destructor)
  • To invoke the method in a base class use the syntax Baseclass..method.

Properties

  • It is standard practice to expose public properties using the Property Get and Property Set statements.

Whilst it is possible to define properties via Public variables, this is not favoured in traditional OOP.

Events

  • It is possible to trap events from Notes UI classes in any class that extends these classes using the Syntax On Event eventName From Notesclass Call eventhandlername
  • It is recommended that event handler be assigned a easily identifiable name using a convenient naming standard such as OnEventname
expanded Attachments (0)
collapsed Attachments (0)
expanded Versions (19)
collapsed Versions (19)
Version Comparison     
VersionDateChanged by              Summary of changes
19Mar 15, 2010, 4:33:04 PM~Sven Desluzenetsi  
18Mar 15, 2010, 4:31:35 PM~Dexter Eljipy  
17Mar 15, 2010, 4:24:12 PM~Dexter Eljipy  
16Mar 15, 2010, 4:21:32 PM~Dexter Eljipy  
15Mar 15, 2010, 4:18:35 PM~Dexter Eljipy  
14Mar 15, 2010, 3:52:40 PM~Dexter Eljipy  
This version (13)Mar 15, 2010, 3:52:11 PM~Dexter Eljipy  
12Mar 15, 2010, 3:51:40 PM~Dexter Eljipy  
11Mar 15, 2010, 3:51:10 PM~Dexter Eljipy  
10Mar 15, 2010, 3:46:57 PM~Dexter Eljipy  
9Mar 15, 2010, 3:46:07 PM~Dexter Eljipy  
8Mar 15, 2010, 3:45:32 PM~Dexter Eljipy  
7Mar 15, 2010, 3:42:49 PM~Dexter Eljipy  
6Mar 15, 2010, 3:33:48 PM~Dexter Eljipy  
5Mar 15, 2010, 3:33:20 PM~Dexter Eljipy  
4Mar 15, 2010, 3:26:44 PM~Dexter Eljipy  
3Mar 15, 2010, 3:26:06 PM~Dexter Eljipy  
2Mar 15, 2010, 3:23:03 PM~Dexter Eljipy  
1Mar 15, 2010, 3:14:39 PM~Dexter Eljipy  
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL
  • Privacy
  • Accessibility